Foundation Kit
   HOME

TheInfoList



OR:

The Foundation Kit, or just Foundation for short, is an
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXT ...
framework in the
OpenStep OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep wa ...
specification. It provides basic classes such as wrapper classes and data structure classes. This framework uses the prefix NS (for
NeXTSTEP NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT Computer in the late 1980s and early 1990s and was initially used for its range of propri ...
). It is also part of Cocoa and of the
Swift Swift or SWIFT most commonly refers to: * SWIFT, an international organization facilitating transactions between banks ** SWIFT code * Swift (programming language) * Swift (bird), a family of birds It may also refer to: Organizations * SWIFT, ...
standard library.


Classes


NSObject

This class is the most common base class for
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXT ...
hierarchies and provides standard methods for working with objects by managing the memory associated with them and querying them.


NSString and NSMutableString

A class used for string manipulation, representing a
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, wh ...
string (most typically using UTF-16 as its internal format). NSString is immutable, and thus can only be initialized but not modified. NSMutableString is a modifiable version.


NSValue and NSNumber

NSValue is a wrapper class for
C data types In the C programming language, data types constitute the semantics and characteristics of storage of data elements. They are expressed in the language syntax in form of declarations for memory locations or variables. Data types also determin ...
, and NSNumber is a wrapper class for C number data types such as int, double, and float. The data structures in Foundation Kit can only hold objects, not primitive types, so wrappers such as NSValue and NSNumber are used in those data structures.


NSArray and NSMutableArray

A dynamic array of objects, supporting constant-time indexing. NSArray is an immutable version that can only be initialized with objects but not modified. NSMutableArray may be modified by adding and removing objects.


NSDictionary and NSMutableDictionary

An associative data container of key-value pairs with unique keys. Searching and element addition and removal (in the case of NSMutableDictionary) is faster-than-linear. However, the order of the elements within the container is not guaranteed.


NSSet and NSMutableSet

An associative container of unique keys, similar to NSDictionary, with the difference that members do not contain a data object.


NSData and NSMutableData

A wrapper for raw byte data. An object of this type can dynamically allocate and manage its data, or it can refer to data owned by and managed by something else (such as a static numeric array).


NSDate, NSTimeZone and NSCalendar

Classes that store times and dates and represent calendrical information. They offer methods for calculating date and time differences. Together with NSLocale, they provide methods for displaying dates and times in many formats, and for adjusting times and dates based on location in the world.


Major implementations


macOS and iOS

The Foundation Kit is part of the macOS Cocoa API. Beginning as the successor to
OPENSTEP/Mach OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep was ...
, this framework has deviated from
OpenStep OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep wa ...
compliance, and is in some places incompatible. The Foundation Kit is in the iOS
Cocoa Touch Cocoa Touch is the application development environment for building software programs to run on iOS for the iPhone and iPod Touch, iPadOS for the iPad, watchOS for the Apple Watch, and tvOS for the Apple TV, from Apple Inc. Cocoa Touch ...
API. This framework is based on the macOS Cocoa.


GNUstep

The Foundation Kit is implemented in
GNUstep GNUstep is a free software implementation of the Cocoa (formerly OpenStep) Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project. GNUste ...
's Base Package (libs-base). This implementation is mostly comparable (4 classes are missing) and aims to be comparable with both the
OpenStep OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep wa ...
API and later
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
additions. The missing classes have been dropped by Apple as well.


Cocotron

The Foundation Kit is implemented i
Cocotron
an open-source implementation of Cocoa. It is also a part of Darling.


PureFoundation

PureFoundation
is an open-source implementation of Foundation that implements Foundation by wrapping
Core Foundation Core Foundation (also called CF) is a C application programming interface (API) written by Apple for its operating systems, and is a mix of low-level routines and wrapper functions. Most Core Foundation routines follow a certain naming conventi ...
, just like in Cocoa, rather than create a separate Foundation from scratch like GNUstep and Cocotron.


SwiftFoundation

SwiftFoundation (swift-corelibs-foundation) is Apple's open-source
Swift Swift or SWIFT most commonly refers to: * SWIFT, an international organization facilitating transactions between banks ** SWIFT code * Swift (programming language) * Swift (bird), a family of birds It may also refer to: Organizations * SWIFT, ...
implementation of the Foundation API for platforms where there is no Objective-C runtime. It also includes an implementation of
Core Foundation Core Foundation (also called CF) is a C application programming interface (API) written by Apple for its operating systems, and is a mix of low-level routines and wrapper functions. Most Core Foundation routines follow a certain naming conventi ...
.


ApportableFoundation

ApportableFoundation is an implementation of Foundation Kit (Foundation, CoreFoundation, and CFNetwork) based on Apple's CFLite release. It works on Android and other
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
systems, and makes up part of the Darling macOS translation layer for Linux.


See also

*
OpenStep OpenStep is a defunct object-oriented application programming interface (API) specification for a legacy object-oriented operating system, with the basic goal of offering a NeXTSTEP-like environment on non-NeXTSTEP operating systems. OpenStep wa ...
*
Application Kit AppKit (formally Application Kit) is a graphical user interface toolkit. It initially served as the UI framework for NeXTSTEP. Along with Foundation and Display PostScript, it became one of the core parts of the OpenStep specification of APIs. L ...
*
GNUstep GNUstep is a free software implementation of the Cocoa (formerly OpenStep) Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project. GNUste ...
*
Cocoa (API) Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS. Cocoa consists of the Foundation Kit, Application Kit, and Core Data frameworks, as included by the Cocoa.h header file, ...
*
Cocoa Touch Cocoa Touch is the application development environment for building software programs to run on iOS for the iPhone and iPod Touch, iPadOS for the iPad, watchOS for the Apple Watch, and tvOS for the Apple TV, from Apple Inc. Cocoa Touch ...


References

{{Reflist


External links


GNUstep Base

Apple Foundation Framework Reference


* ttp://www.gnustep.org/resources/OpenStepSpec/FoundationKit/Classes/index.html List of Classesin OpenStep specification NeXT macOS APIs MacOS programming tools